import {request, config ,requestWork} from 'utils';

const {api,host} = config;
const {
    user,
    Maillist,
    Organ,
    duty,
    chack,
    point,
    pointplan,
    Inspectionproject,
    Inspection,
    tongji,
    Rehearsal,
    Learnplan,
    account,
    material,
    placeStorage,
    Allemerg,
    Emplan,
    statutestudy,
    Manage,
    Category,
    Evacuate,
    working,
    privilege,
    task,
} = api;

//获取用户id
export function getUserId (params){
    return request({
        url: `${user.getuserid}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}

//工作台
export function isloginState (params){
    return request({
        url: `${user.login}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}

//获取工作台工作流1
export function getGZL (params){
    return request({
        url: `${duty.getGZL}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//获取工作流2
export function getGZLTow (params){
    return request({
        url: `${host}/runtime/process-instances/${params}/variables`,
        method: 'get',
        contentType: 'application/json',
        data: {},
    });
}

//获取工作流详情
export function getGZLList (params){
    return request({
        url: `${working.dashboardList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
// 登录函数
export function login (params) {
    return request({
        url: `${user.login}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//推出登陆
export function loginout (params) {
    return request({
        url: `${user.loginout}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}


//通讯录查询
export function getMaillist (params){
    return request({
        url: `${Maillist.getMaillist}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//获取外部通讯录
export function getTXLWB (params){
    return request({
        url: `${Maillist.getMaillist_tow}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加通讯录
export function postMaillist (params){
    return request({
        url: `${Maillist.postMaillist}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
export function postMaillist_tow (params){
    return request({
        url: `${Maillist.postMaillist_tow}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除通讯录
export function deleteMaillist (params){
    return request({
        url: `${Maillist.deleteMaillist}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改通讯录
export function putMaillist (params){
    return request({
        url: `${Maillist.putMaillist}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
export function putMaillist_tow (params){
    return request({
        url: `${Maillist.putMaillist_tow}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//获取部门职责
export function getBMZZ (params){
    return request({
        url: `${Maillist.getBMZZ}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//获取部门通讯录
export function getAllRoleOne (params){
    return request({
        url: `${Maillist.getAllRoleOne}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//获取角色
export function getAllRoleTow (params){
    return request({
        url: `${Maillist.getAllRoleTow}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加角色
export function postOrganRole (params){
    return request({
        url: `${Maillist.postOrganRole}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}

//获取组织结构
export function getOrgan (params){
    return request({
        url: `${Organ.getOrgan}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加组织结构
export function postOrgan (params){
    return request({
        url: `${Organ.postOrgan}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除组织结构
export function deleteOrgan (params){
    return request({
        url: `${Organ.deleteOrgan}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//获取通讯录
export function getTXL (params){
    return request({
        url: `${Organ.getTXL}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//获取添加通讯录
export function getTXLOUT (params){
    return request({
        url: `${Organ.getTXLOUT}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加树上通讯录
export function postTXL (params){
    return request({
        url: `${Organ.postTXL}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//移除树上通讯录
export function deleteTXL (params){
    return request({
        url: `${Organ.deleteTXL}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}


//查日历月
export function getDutyMM (params){
    return request({
        url: `${duty.getDutyMM}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//查日历年
export function getDutyYY (params){
    return request({
        url: `${duty.getDutyYY}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//查日历详情
export function getDutyList (params){
    return request({
        url: `${duty.getDutyList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加日历
export function postDuty (params){
    return request({
        url: `${duty.postDuty}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//获取日历通讯录
export function getDutyTXL (params){
    return request({
        url: `${duty.getDutyTXL}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//工作台
export function getGZT (params){
    return request({
        url: `${duty.getGZT}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}


//巡检点查询
export function getCheck (params){
    return request({
        url: `${chack.getCheck}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加巡检点
export function postCheck (params){
    return request({
        url: `${chack.postCheck}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除巡检点
export function deleteChack (params){
    return request({
        url: `${chack.deleteChack}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改巡检点
export function putCheck (params){
    return request({
        url: `${chack.putCheck}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}


//查询巡路线
export function getPoint (params){
    return request({
        url: `${point.getPoint}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加巡检路线
export function postPoint (params){
    return request({
        url: `${point.postPoint}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//修改巡检路线
export function putPoint (params){
    return request({
        url: `${point.putPoint}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//删除巡检路线
export function deletePoint (params){
    return request({
        url: `${point.deletePoint}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}


//查询巡检计划
export function getPointplan (params){
    return request({
        url: `${pointplan.getPointplan}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加巡检计划
export function postPointplan (params){
    return request({
        url: `${pointplan.postPointplan}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除巡检计划
export function deletePointplan (params){
    return request({
        url: `${pointplan.deletePointplan}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改巡检计划
export function putPointplan (params){
    return request({
        url: `${pointplan.putPointplan}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}


//查询检查项目目录
export function getIns (params){
    return request({
        url: `${Inspection.getIns}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加目录
export function postIns (params) {
    return request({
        url: `${Inspection.postIns}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//修改目录
export function putIns (params) {
    return request({
        url: `${Inspection.putIns}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}

//查询检查项目
export function getInspep (params){
    return request({
        url: `${Inspectionproject.getInspep}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//查询检查项目2
export function getInspepTow (params){
    return request({
        url: `${Inspectionproject.getpointgo}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//新增检查项目
export function postInspep (params){
    return request({
        url: `${Inspectionproject.postInspep}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}

//详情
export function goListIN (params){
    return request({
        url: `${Inspectionproject.getInspepList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}

//添加详情
export function postList (params){
    return request({
        url: `${Inspectionproject.postList}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//统计1
export function getPlanValue (params){
    return request({
        url: `${tongji.plan}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//统计2
export function getRoadValue (params){
    return request({
        url: `${tongji.roald}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}

//查询演练几乎
export function getRehearsal (params){
    return request({
        url: `${Rehearsal.getRehearsal}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加演练计划
export function postRehearsal (params){
    return request({
        url: `${Rehearsal.postRehearsal}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除演练计划
export function deleteRehearsal (params){
    return request({
        url: `${Rehearsal.deleteRehearsal}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改演练计划
export function putRehearsal (params){
    return request({
        url: `${Rehearsal.putRehearsal}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//获取演练部门
export function getYLBM (params){
    return request({
        url: `${Rehearsal.getYLBM}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}


//查询预案学习
export function getLearnplan (params){
    return request({
        url: `${Learnplan.getLearnplan}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加预案学习
export function postLearnplan (params){
    return request({
        url: `${Learnplan.postLearnplan}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}

//删除学习计划
export function deleteLearnplan (params){
    return request({
        url: `${Learnplan.deleteLearnplan}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改学习计划
export function putLearnplan (params){
    return request({
        url: `${Learnplan.putLearnplan}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//演练资料详情
export function getLearnplanList (params) {
    return request({
        url: `${Learnplan.getLearnplanList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}

//查询系统账户
export function getAccount (params){
    return request({
        url: `${account.getAccount}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加系统账户
export function postAccount (params){
    return request({
        url: `${account.postAccount}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//修改系统账户
export function putAccount (params){
    return request({
        url: `${account.putAccount}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}


//查询应急物资基础信息
export function getEmerg (params){
    return request({
        url: `${material.getMaterial}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加物资信息
export function postEmerg (params){
    return request({
        url: `${material.postEmerg}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//查询物资详情
export function getEmergList (params){
    return request({
        url: `${material.getEmergList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加详情
export function postEmergList (params){
    return request({
        url: `${material.postEmergList}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除详情
export function listDelete (params){
    return request({
        url: `${material.listDelete}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}


//查询库存地点
export function getStorage (params){
    return request({
        url: `${placeStorage.getStorage}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加库存地点
export function postStorage (params){
    return request({
        url: `${placeStorage.postStorage}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//查询应急物资信息
export function getAllemerg (params){
    return request({
        url: `${Allemerg.getAllemerg}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//查关联信息地址
export function getADDaddress (params){
    return request({
        url: `${Allemerg.getADDaddress}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//查关联信息物资
export function getADDmaterial (params){
    return request({
        url: `${Allemerg.getADDmaterial}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加物资
export function postAllemerg (params){
    return request({
        url: `${Allemerg.postAllemerg}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//物资详情
export function getAllemergList (params){
    return request({
        url: `${Allemerg.getAllemergList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//物资详情2
export function getAllemergListTow (params){
    return request({
        url: `${Allemerg.getAllemergListTow}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}

//应急预案
export function getEmplan (params){
    return request({
        url: `${Emplan.getEmplan}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//新增应急预案
export function postEmplan (params){
    return request({
        url: `${Emplan.postEmplan}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除预案
export function deleteEmplan (params){
    return request({
        url: `${Emplan.deleteEmplan}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改预案
export function putEmplan (params){
    return request({
        url: `${Emplan.putEmplan}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
// 预案详情
export function getEmplanList (params){
    return request({
        url: `${Emplan.getEmplanList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//删除预案详情
export function deleteEmplanList (params){
    return request({
        url: `${Emplan.deleteEmplanList}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//添加预案详情
export function postEmplanList (params){
    return request({
        url: `${Emplan.postEmplanList}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//修改预案详情
export function putEmplanList (params){
    return request({
        url: `${Emplan.putEmplanList}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}

//添加预案参数1
export function postEmplanList_Tow (params){
    return request({
        url: `${Emplan.postEmplanList_Tow}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除预案参数1
export function deleteEmplanList_Tow (params){
    return request({
        url: `${Emplan.deleteEmplanList_Tow}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改预案参数1
export function putEmplanList_Tow (params){
    return request({
        url: `${Emplan.deleteEmplanList_Tow}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}

//添加预案参数2
export function postEmplanList_Third (params){
    return request({
        url: `${Emplan.postEmplanList_Third}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
export function deleteEmplanList_Third (params){
    return request({
        url: `${Emplan.deleteEmplanList_Third}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
export function putEmplanList_Third (params){
    return request({
        url: `${Emplan.putEmplanList_Third}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//启动工作流
export function postWorkingEmp (params){
    return request({
        url: `${working.postWorkingEmp}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//查询法规
export function getStudy (params){
    return request({
        url: `${statutestudy.getStudy}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加法规
export function postStudy (params){
    return request({
        url: `${statutestudy.postStudy}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除法规
export function deleteStudy (params){
    return request({
        url: `${statutestudy.deleteStudy}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改法规
export function putStudy (params){
    return request({
        url: `${statutestudy.putStudy}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}

//查询应急物资接口
export function getMaterial (params){
    return request({
        url: `${material.getMaterialrecord}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}

//查询巡检记录接口
export function getProduction (params){
    return request({
        url: `${Allemerg.getProduction}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//查询巡检记录详情接口
export function getProductionList (params){
    return request({
        url: `${Allemerg.getProductionList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//下载数据
export function downloadUrl (params){
    return request({
        url: `${host}${params.url}`,
        method: 'post',
        contentType: 'application/json',
        data: params.data,
    });
}
//安全隐患查询
export function getManage (params){
    return request({
        url: `${Manage.getManage}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加安全隐患
export function postManage (params){
    return request({
        url: `${Manage.postManage}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//修改安全隐患
export function putManage (params){
    return request({
        url: `${Manage.putManage}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//删除安全隐患
export function deleteManage (params){
    return request({
        url: `${Manage.putManage}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}

//演练题目
export function getCategory (params){
    return request({
        url: `${Category.getCategory}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//删除题目
export function deleteCategoryDown (params){
    return request({
        url: `${Category.deleteCategoryDown}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改题目
export function putCategoryDown (params){
    return request({
        url: `${Category.putCategoryDown}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}
//提交题目
export function postCategory (params) {
    return request({
        url: `${Category.postCategory}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//获取题目目录
export function getCategoryList (params) {
    return request({
        url: `${Category.getCategoryList}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加题目目录
export function postCategoryListUp (params) {
    return request({
        url: `${Category.postCategoryListUp}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除题目目录
export function deleteCategoryListUp (params) {
    return request({
        url: `${Category.deleteCategoryListUp}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//获取目录下的题目
export function getCategoryDown (params) {
    return request({
        url: `${Category.getCategoryDown}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加题目
export function postCategoryDown (params) {
    return request({
        url: `${Category.postCategoryDown}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//查询应急疏散场所
export function getEvacuate (params) {
    return request({
        url: `${Evacuate.getEvacuate}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//添加应急疏散场所
export function postEvacuate (params) {
    return request({
        url: `${Evacuate.postEvacuate}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//删除疏散场所
export function deleteEvacuate (params) {
    return request({
        url: `${Evacuate.deleteEvacuate}`,
        method: 'delete',
        contentType: 'application/json',
        data: params,
    });
}
//修改疏散场所
export function putEvacuate (params) {
    return request({
        url: `${Evacuate.putEvacuate}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}


//工作流
export function getworking (params) {
    return request({
        url: `${working.getworking}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//工作流详情
export function getworkingList (params) {
    return request({
        url: `${working.getworkingList}/${params.processInstanceId}`,
        method: 'get',
        contentType: 'application/json',
        // data: params,
    });
}
//获取处理信息
export function getTaskData (params) {
    return request({
        url: `${working.getTaskData}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//提交处理信息
export function postTaskData (params) {
    return request({
        url: `${working.postTaskData}/${params.taskId}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//获取下发通知
export function getPrivilege (params) {
    return request({
        url: `${privilege.getprivilege}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//获取公告
export function getPrivilegeTow (params) {
    return request({
        url: `${privilege.getPrivilegeTow}`,
        method: 'get',
        contentType: 'application/json',
        data: params,
    });
}
//下发通知
export function postPrivilege (params) {
    return request({
        url: `${privilege.postprivilege}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//发送公告
export function postPrivilegeTow (params) {
    return request({
        url: `${privilege.postPrivilegeTow}`,
        method: 'post',
        contentType: 'application/json',
        data: params,
    });
}
//公告详情
export function getprivilegeList (params) {
    return request({
        url: `${privilege.getprivilegeList}/${params.id}`,
        method: 'get',
        contentType: 'application/json',
        // data: params,
    });
}
// 离职人员列表
export function getUserLeave (params) {
    const {keywords, pageIndex, pageCount} = params;
    const url = `${user.userLeave}?name=${keywords?keywords:``}&pageNumber=${pageIndex}&pageSize=${pageCount}`;
    return request({
        url,
        method: 'get',
    });
}

// 新增离职人员
export function putUserLeave (params) {
    return request({
        url: `${user.userLeave}`,
        method: 'put',
        contentType: 'application/json',
        data: params,
    });
}

// 查询考试报表
export function getTaskExamForms (params) {
    const {date, pageIndex, pageCount} = params;
    const url = date ? `${task.exam}/exam/forms?date=${date}&pageNumber=${pageIndex}&pageSize=${pageCount}`
        : `${task.exam}/exam/forms?pageNumber=${pageIndex}&pageSize=${pageCount}`;
    return request({
        url,
        method: 'get',
    });
}

// 查询考试报表个人月份得分明细
export function getTaskExamlUserForms (params) {
    const {userId, date, pageIndex, pageCount} = params;
    const url = date ? `${task.exam}/exam/forms/detail?date=${date}&user_id=${userId}&pageNumber=${pageIndex}&pageSize=${pageCount}`
        : `${task.exam}/exam/forms/detail?user_id=${userId}&pageNumber=${pageIndex}&pageSize=${pageCount}`;
    return request({
        url,
        method: 'get',
    });
}


export function getTaskIntegralForms (params) {
    const {date, pageIndex, pageCount} = params;
    const url = date ? `${task.exam}/integral/forms?date=${date}&pageNumber=${pageIndex}&pageSize=${pageCount}`
        : `${task.exam}/integral/forms?pageNumber=${pageIndex}&pageSize=${pageCount}`;
    return request({
        url,
        method: 'get',
    });
}


// 查询考试报表个人月份得分明细
export function getTaskIntegralUserForms (params) {
    const {userId, date, pageIndex, pageCount} = params;
    const url = date ? `${task.exam}/integral/forms/detail?date=${date}&user_id=${userId}&pageNumber=${pageIndex}&pageSize=${pageCount}`
        : `${task.exam}/integral/forms/detail?user_id=${userId}&pageNumber=${pageIndex}&pageSize=${pageCount}`;
    return request({
        url,
        method: 'get',
    });
}
